package com.lagou.edu.dao;

import com.lagou.edu.entity.AuthCode;
import com.lagou.edu.entity.Token;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * @Author: yeqingyun
 * @Date: 2020/11/20 16:31
 */
public interface AuthCodeDao extends JpaRepository<AuthCode, Integer> {

    @Query(value = "select  * from lagou_auth_code where email=? order by id desc limit 1",nativeQuery = true)
    AuthCode findByEmail(String name);
}
